/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package dataanalysis.gui.dataviewer;

import java.awt.Component;
import javax.swing.JTable;
import javax.swing.table.TableCellRenderer;

/**
 *
 * @author Administrator
 */
public class CellRenderer implements TableCellRenderer {

    @Override
    public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {

        if (value == null){
            return null;
        }else
            return table.getDefaultRenderer(value.getClass()).getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);

//        if(value instanceof Boolean){
//            JCheckBox check=new JCheckBox();
//            check.setSelected((Boolean)value);
//            return check;
//        }
    }
}
